package com.distributor;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ComingSoon extends Activity 
{
	Button btnLogout,btnBack;
	TextView tveaderText;
	public void onCreate(Bundle savedInstanceState) 
	{
        super.onCreate(savedInstanceState);
        setContentView(R.layout.tab);
        
//        btnLogout=(Button)findViewById(R.id.btnLogout);
//        btnBack=(Button)findViewById(R.id.btnPrevious);
//        tveaderText=(TextView)findViewById(R.id.tv_headerText);
//        
//        tveaderText.setVisibility(TextView.INVISIBLE);
//        
//        btnLogout.setOnClickListener(new OnClickListener()
//        {
//        	
//        	public void onClick(View arg0) 
//			{
//				// TODO Auto-generated method stub
//				  setResult(2);
//				  finish();
//			}
//        	
//		});
//        
//        btnBack.setOnClickListener(new OnClickListener()
//        {
//			public void onClick(View v) 
//			{
//				// TODO Auto-generated method stub
//				finish();
//			}
//		});
	}

	@Override
	public void onBackPressed() 
	{
		// TODO Auto-generated method stub
		
		new AlertDialog.Builder(ComingSoon.this)
        .setTitle( "Exit Application." )
        .setMessage( "Are you sure you want to Exit ?" )
        .setPositiveButton("YES", new android.content.DialogInterface.OnClickListener() 
        {
            public void onClick(DialogInterface arg0, int arg1) 
            {
                //do stuff onclick of YES
            	finish();
            }
            
			public void onClick(View v) 
			{
				// TODO Auto-generated method stub
				
			}
			
        })
        .setNegativeButton("NO",  new android.content.DialogInterface.OnClickListener()
        {
        	public void onClick(DialogInterface arg0, int arg1)
            {
                //do stuff onclick of CANCEL
            	arg0.dismiss();
            }

			public void onClick(View v) 
			{
				// TODO Auto-generated method stub
			}
        }).show();
	}
}
